<%@ page language="C#" masterpagefile="~/MasterPage.master" autoeventwireup="true" inherits="Gestion_Default, App_Web_62tmi3of" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contenido" Runat="Server">
    <table width="600">
        <tr>
            <td align="left" colspan="1" style="width: 12px; height: 14px; text-align: left"
                valign="top">
            </td>
            <td align="left" colspan="2" style="height: 14px; text-align: left" valign="top">
                <strong>Datos generales<br />
                </strong>
            </td>
            <td align="left" colspan="1" style="height: 14px; text-align: left"
                valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="text-align: right" valign="top">
                                                Familia :</td>
            <td align="left" colspan="1" valign="top">
                                                <asp:DropDownList ID="ddlFamilia" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlFamilia_SelectedIndexChanged"
                                                    Width="200px">
                                                </asp:DropDownList>
                *</td>
            <td align="left" colspan="1" valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="text-align: right" valign="top">
                                                Producto :</td>
            <td align="left" colspan="1" style="text-align: left" valign="top">
                                                <asp:DropDownList ID="ddlProducto" runat="server" Width="200px" ToolTip='Eval("Descripcion")' OnSelectedIndexChanged="ddlProducto_SelectedIndexChanged" AutoPostBack="True">
                                                </asp:DropDownList>
                *</td>
            <td align="left" colspan="1" style="text-align: left" valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="text-align: right" valign="top">
                                                Cantidad :</td>
            <td align="left" colspan="1" style="text-align: left" valign="top">
                                                <asp:TextBox ID="txbCantidad" runat="server" onChange="intOnly(this);" onkeypress="intOnly(this);"
                                                    onkeyup="intOnly(this);" Width="200px"></asp:TextBox>
                *
                <asp:RequiredFieldValidator ID="rfvCantidad" runat="server" ErrorMessage="Requerido" ControlToValidate="txbCantidad" ValidationGroup="agregar"></asp:RequiredFieldValidator></td>
            <td align="left" colspan="1" style="text-align: left" valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="text-align: left" valign="top">
                                                <asp:Button ID="btnAgregar" runat="server" CssClass="botonNuevo" OnClick="btnAgregar_Click"
                                                    Text="Agregar" Width="95px" ValidationGroup="agregar" />
                <asp:Button ID="btnFinalizar" runat="server" CssClass="botonFinalizado" OnClick="btnFinalizar_Click"
                                                    Text="Finalizar" Width="95px" /></td>
            <td align="left" colspan="1" style="text-align: left" valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="3" style="text-align: right" valign="top">
                <asp:GridView ID="gdvDetalle" runat="server" AutoGenerateColumns="False"
                        Width="100%" DataKeyNames="Id" Height="100%" OnSelectedIndexChanged="gdvDetalle_SelectedIndexChanged">
                                    <RowStyle CssClass="RowStyle" />
                                    <Columns>
                                        <asp:TemplateField HeaderText="Codigo">
                                            <EditItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Producto.Codigo") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Producto.Codigo") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Descripcion">
                                            <EditItemTemplate>
                                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("Producto.Descripcion") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("Producto.Descripcion") %>'></asp:Label>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                <asp:Label ID="lblProducto" runat="server" Width="100%"></asp:Label>
                                            </FooterTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Cantidad">
                                            <EditItemTemplate>
                                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("Cantidad") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("Cantidad") %>'></asp:Label>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                &nbsp;
                                            </FooterTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Saldo">
                                            <EditItemTemplate>
                                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("Saldo") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="lblSaldo" runat="server" Text='<%# Eval("Saldo") %>'></asp:Label>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                &nbsp;
                                            </FooterTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField ShowHeader="False">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lbtEliminar" runat="server" CommandName="Select">Eliminar</asp:LinkButton>&nbsp;
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerStyle CssClass="PagerStyle" />
                                    <SelectedRowStyle CssClass="SelectedRowStyle" />
                                    <HeaderStyle CssClass="HeaderStyle" />
                                    <AlternatingRowStyle CssClass="AltRowStyle" />
                                </asp:GridView>
            </td>
        </tr>
    </table>
    &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp;&nbsp;
</asp:Content>

